﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Newtonsoft.Json;

namespace Bzzb.Model
{
    [Table(Name = "renwu")]
    public class RenWu
    {
        [Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [Column(Name = "number")]
        [Description("任务编号")]
        [JsonProperty("number")]
        public string Number { get; set; }

        [Column(Name = "rq", DbType = "datetime(0)")]
        [Description("日期")]
        [JsonProperty("rq")]
        public DateTime Rq { get; set; }

        [Column(Name = "duty")]
        [Description("班值")]
        [JsonProperty("duty")]
        public string Duty { get; set; }

        [Column(Name = "shift")]
        [Description("班次")]
        [JsonProperty("shift")]
        public string Shift { get; set; }

        [Column(Name = "status")]
        [Description("状态")]
        [JsonProperty("status")]
        public string Status { get; set; }

        [Column(Name = "daan", StringLength = -1)]
        [Description("任务答案")]
        [JsonProperty("daan")]
        public string Daan { get; set; }

        [Column(Name = "begintime", DbType = "datetime(0)")]
        [Description("开始时间")]
        [JsonProperty("begintime")]
        public DateTime BeginTime { get; set; }

        [Column(Name = "endtime", DbType = "datetime(0)")]
        [Description("结束时间")]
        [JsonProperty("endtime")]
        public DateTime EndTime { get; set; }

        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("created")]
        public DateTime CreateTime { get; set; }

        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("updated")]
        public DateTime UpdateTime { get; set; }
    }
}
